#  /**
#  * Copyright (c) 2022 Beijing Jiaotong University
#  * PhotLab is licensed under [Open Source License].
#  * You can use this software according to the terms and conditions of the [Open Source License].
#  * You may obtain a copy of [Open Source License] at: [https://open.source.license/]
#  *
#  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
#  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
#  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#  *
#  * See the [Open Source License] for more details.
#  */
#  /**
#  * Author: Zheng Wang
#  * Created: Jul. 7, 2022
#  * Supported by: National Key Research and Development Program of China
#  */
import phot
from phot_engine.utils.module_analyzer import ModuleAnalyzer

phot_class_list = []
phot_function_list = []


def init_engine_globals(module_name=phot):
    """
        计算引擎初始化函数,用于自动分析底层运算库类和函数名
    :param module_name:
    :return:
    """
    ma = ModuleAnalyzer(module_name=module_name)
    global phot_class_list
    global phot_function_list

    phot_class_list = ma.get_all_classes_name()
    phot_function_list = ma.get_all_functions_name()
    return phot_class_list,phot_function_list

if __name__ == '__main__':
    init_engine_globals(phot)
    print(phot_class_list)
    print(phot_function_list)
